package com.by.controller;

import com.by.common.api.CommonResult;
import com.by.service.TextService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/phone")
@Api(tags = "测试")
public class TextController {
    @Autowired
    TextService textService;
    @GetMapping("/text")
    @ApiOperation("查询所有")
    public CommonResult findAll(){
        return textService.findAll();
    }
    @PreAuthorize("hasAuthority('wx:product:delete')")
    @RequestMapping("/getPhones")
    public String getPhones() {
        return "getPhones";
    }
}
